package samplequickstart.action;

import com.opensymphony.xwork2.ActionSupport;

/**
 * Created by IntelliJ IDEA.
 * User: lukman
 * Date: 6/9/11
 * Time: 3:57 AM
 * To change this template use File | Settings | File Templates.
 */
public class YourNameAction extends ActionSupport {

    private String name;

    public String execute() throws Exception {
        if (name == null || name.length() < 3) {
            addActionError("Please enter valid name with more the 2 characters!");
            return ERROR;
        }

        return SUCCESS;
    }

    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }
}